﻿using System.Collections.Generic;
using System.Diagnostics.Contracts;

namespace TestWebApp.DataAccess.Common
{
    [ContractClass(typeof(RepositoryContract<>))]
    public interface IRepository<T> where T : class
    {
        IEnumerable<T> GetAll();
        T GetById(object id);
        T Insert(T obj);
        T Update(T obj);
        void DeleteById(object id);
        void Delete(T obj);
        void Save();
        void Attach(T obj);
    }
}
